<!DOCTYPE HTML>
<!--
     Any copyright is dedicated to the Public Domain.
     http://creativecommons.org/publicdomain/zero/1.0/
-->
<html><head>
  <meta charset="utf-8">
  <title>Example of 'masonry-auto-flow: next' masonry layout</title>
</head>
<body>

<style>
.grid {
  display: inline-grid-lanes;
  grid-template-columns: repeat(3, 2ch);
  border: 1px solid;
  masonry-auto-flow: next;
}

item { background: silver }
item:nth-child(2n+1) {
  background: pink;
  height: 4em;
}
</style>

<div class="grid">
  <item>1</item>
  <item>2</item>
  <item>3</item>
  <item>4</item>
</div>

</body>
</html>
